package xyz.iguilty.workflow.example.activity.trip;

import org.springframework.stereotype.Component;
import xyz.iguilty.workflow.core.service.AbstractActivity;
import xyz.iguilty.workflow.model.ActivityContext;
import xyz.iguilty.workflow.model.ActorModel;
import xyz.iguilty.workflow.model.BusinessModel;
import xyz.iguilty.workflow.model.SimpleUser;

@Component("attendance_businessTrip_initiate")
public class BusinessTripInitiateActivity extends AbstractActivity<BusinessModel, String> {

    @Override
    public String currentActivityKey() {
        return "attendance_businessTrip_initiate";
    }

    @Override
    public ActorModel getCurrentActors(ActivityContext context) {
        SimpleUser starter = workFlowIdentityService.getStarter(context.getProcessInstanceId());
        return ActorModel.buildFromCandidateUser(starter);
    }
}
